<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
    <title>这是一个空间</title>
    <link rel="stylesheet" href="static/css/index.css">
    <script type="text/javascript" src="static/js/three.js"></script>
    <script type="text/javascript" src="static/js/three/FBXLoader.js"></script>
    <script type="text/javascript" src="static/js/three/inflate.min.js"></script>
    <script type="text/javascript" src="static/js/three/OBJLoader.js"></script>
    <script type="text/javascript" src="static/js/three/MTLLoader.js"></script>
    <script type="text/javascript" src="static/js/three/OrbitControls.js"></script>
    <script type="text/javascript" src="static/js/config.js"></script>
    <script type="text/javascript" src="static/js/space/index.js"></script>
    <script type="text/javascript" src="static/js/space/animation.js"></script>

</head>
<body>
<div id="max" class="max"></div>
<div class="box">
    <!--<select class="select" id="videoDevice"></select>-->
    <!--<video id="video" playsinline></video>-->
    <!--<button onclick="openCamera()"> 打开摄像头</button>-->


</div>
<script type="text/javascript">
    let AP = new APP();
    window.addEventListener('resize', function () {
        AP.setSize(window.innerWidth, window.innerHeight);
    });
    AP.init();
     //openCamera();
    function openCamera() {
        var enu=navigator.mediaDevices.enumerateDevices();
        enu.then((devices)=>{
            console.log("列出成功"+JSON.stringify(devices));
            let videoDevice=document.getElementById("#videoDevice");


             devices.find((device)=>{
                 if(device.kind=="videoinput"){
                     let option=document.createElement("option");

                     option.textv=device.label;
                     option.value=device.deviceId;
                     videoDevice.appendChild(option);


                 }
             })

        },(err)=>{
            console.log("列出失败")


        })



    }
</script>
</body>
</html>
